﻿using SqlSugar;

namespace AutoTest.Domain.Entities
{
    /// <summary>
    /// 订单提成
    /// </summary>
    [SugarTable("t_order_promote", TableDescription = "订单提成")]
    public class OrderPromote
    {
        ///<summary>
        /// 商品主键
        ///</summary>
        [SugarColumn(IsPrimaryKey = true, ColumnName = "id", ColumnDescription = "主键Id")]
        public long Id { get; set; } = 0;
        ///<summary>
        /// 订单创建时间
        ///</summary>
        [SugarColumn(ColumnName = "create_time", ColumnDescription = "订单创建时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;
        ///<summary>
        /// 一级提成（单位：分）
        ///</summary>
        [SugarColumn(ColumnName = "first_level_amount", ColumnDescription = "一级提成（单位：分）")]
        public int FirstLevelAmount { get; set; } = 0;
        ///<summary>
        /// 一级提成比例（%）
        ///</summary>
        [SugarColumn(ColumnName = "first_level_rate", ColumnDescription = "一级提成比例（%）")]
        public decimal FirstLevelRate { get; set; } = 0M;
        ///<summary>
        /// 一级提成userid
        ///</summary>
        [SugarColumn(ColumnName = "first_user_id", ColumnDescription = "一级提成userid")]
        public long FirstUserId { get; set; } = 0;
        ///<summary>
        /// 一级提成用户昵称
        ///</summary>
        [SugarColumn(ColumnName = "first_user_name", ColumnDescription = "一级提成用户昵称")]
        public string FirstUserName { get; set; } = string.Empty;
        ///<summary>
        /// 订单id
        ///</summary>
        [SugarColumn(ColumnName = "order_id", ColumnDescription = "订单id")]
        public long OrderId { get; set; } = 0;
        ///<summary>
        /// 订单号
        ///</summary>
        [SugarColumn(ColumnName = "order_no", ColumnDescription = "订单号")]
        public string OrderNo { get; set; } = string.Empty;
        ///<summary>
        /// 平台提成（单位：分）
        ///</summary>
        [SugarColumn(ColumnName = "platform_amount", ColumnDescription = "平台提成（单位：分）")]
        public int PlatformAmount { get; set; } = 0;
        ///<summary>
        /// 平台比例（%）
        ///</summary>
        [SugarColumn(ColumnName = "platform_rate", ColumnDescription = "平台比例（%）")]
        public decimal PlatformRate { get; set; } = 0M;
        ///<summary>
        /// 合伙人提成（单位：分）
        ///</summary>
        [SugarColumn(ColumnName = "root_amount", ColumnDescription = "合伙人提成（单位：分）")]
        public int RootAmount { get; set; } = 0;
        ///<summary>
        /// 合伙人比例（%）
        ///</summary>
        [SugarColumn(ColumnName = "root_rate", ColumnDescription = "合伙人比例（%）")]
        public decimal RootRate { get; set; } = 0M;
        ///<summary>
        /// 合伙人Id
        ///</summary>
        [SugarColumn(ColumnName = "root_user_id", ColumnDescription = "合伙人Id")]
        public long RootUserId { get; set; } = 0;
        ///<summary>
        /// 合伙人昵称
        ///</summary>
        [SugarColumn(ColumnName = "root_user_name", ColumnDescription = "合伙人昵称")]
        public string RootUserName { get; set; } = string.Empty;
        ///<summary>
        /// 二级提成（单位：分）
        ///</summary>
        [SugarColumn(ColumnName = "second_level_amount", ColumnDescription = " 二级提成（单位：分）")]
        public int SecondLevelAmount { get; set; } = 0;
        ///<summary>
        /// 二级提成比例（%）
        ///</summary>
        [SugarColumn(ColumnName = "second_level_rate", ColumnDescription = "二级提成比例（%）")]
        public decimal SecondLevelRate { get; set; } = 0M;
        ///<summary>
        /// 二级提成用户UserId
        ///</summary>
        [SugarColumn(ColumnName = "second_user_id", ColumnDescription = "二级提成用户UserId")]
        public long SecondUserId { get; set; } = 0;
        ///<summary>
        /// 二级提成用户昵称
        ///</summary>
        [SugarColumn(ColumnName = "second_user_name", ColumnDescription = "二级提成用户昵称")]
        public string SecondUserName { get; set; } = string.Empty;

    }
}
